Getting Started with Variants
This document aims creating new variants of a single product. So product creation steps are skipped.
1 - Create a Variation Group
Firsly you need to create a Variation Group to use on any product later.
Use /v2/variation-groups/apps/{{appId}}/ endpoint for that.
2 - Add a Variation Group to Product
Then you need to define a variation group to a product. You should use following endpoint to attach a variation group to an existing product:
/v2/apps/{{appId}}/products/{{productId}}/variation-groups/
3 - Add a Variant to Product
Finally you can add a variation to an existing product. Use following endpoint to add a variant product.
/v2/apps/{{appId}}/products/{{productId}}/variants
Just Remember: After a variant product added, your main product will not be available to buy, only your variant products can be bought. Main products stock will be invalidated.